<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Contact John Doe for professional inquiries">
    <title>Contact | John Doe</title>
    
    <!-- Google Fonts -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Montserrat:wght@700&family=Fira+Code&display=swap" rel="stylesheet">
    
    <!-- Tailwind CSS CDN -->
    <script src="https://cdn.tailwindcss.com"></script>
    <!-- FontAwesome CDN -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <!-- Custom CSS -->
    <link rel="stylesheet" href="/css/styles.css">
</head>
<body class="font-inter bg-white text-dark">
    <!-- Navigation -->
    <header class="sticky top-0 z-50 bg-white/90 backdrop-blur-sm shadow-sm transition-all">
        <nav class="container flex items-center justify-between py-4">
            <a href="/" class="font-montserrat font-bold text-primary text-xl">JD</a>
            <div class="hidden md:flex space-x-8">
                <a href="/" class="text-gray-600 hover:text-primary">Home</a>
                <a href="/about.html" class="text-gray-600 hover:text-primary">About</a>
                <a href="/projects.html" class="text-gray-600 hover:text-primary">Projects</a>
                <a href="/blog.html" class="text-gray-600 hover:text-primary">Blog</a>
                <a href="/contact.html" class="text-primary hover:text-secondary">Contact</a>
            </div>
            <button class="md:hidden" aria-expanded="false" aria-label="Menu">
                <i class="fas fa-bars text-xl"></i>
            </button>
        </nav>
    </header>

    <!-- Contact Section -->
    <main class="container py-8 md:py-16">
        <div class="max-w-4xl mx-auto">
            <h1 class="font-montserrat text-3xl md:text-4xl font-bold mb-8 text-center">Get In Touch</h1>
            
            <div class="grid md:grid-cols-2 gap-12">
                <!-- Contact Form -->
                <section aria-labelledby="contact-form-heading">
                    <h2 id="contact-form-heading" class="font-montserrat text-2xl font-semibold mb-6">Send a Message</h2>
                    
                    <form id="contactForm" class="space-y-6">
                        <!-- Name Field -->
                        <div>
                            <label for="name" class="block text-sm font-medium text-gray-700 mb-1">Full Name</label>
                            <input type="text" id="name" name="name" required
                                   class="w-full px-4 py-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-all"
                                   aria-required="true"
                                   aria-describedby="name-error">
                            <div id="name-error" class="text-error text-sm mt-1 opacity-0 transition-opacity"></div>
                        </div>
                        
                        <!-- Email Field -->
                        <div>
                            <label for="email" class="block text-sm font-medium text-gray-700 mb-1">Email Address</label>
                            <input type="email" id="email" name="email" required
                                   class="w-full px-4 py-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-all"
                                   aria-required="true"
                                   aria-describedby="email-error">
                            <div id="email-error" class="text-error text-sm mt-1 opacity-0 transition-opacity"></div>
                        </div>
                        
                        <!-- Subject Field -->
                        <div>
                            <label for="subject" class="block text-sm font-medium text-gray-700 mb-1">Subject</label>
                            <input type="text" id="subject" name="subject" required
                                   class="w-full px-4 py-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-all"
                                   aria-required="true"
                                   aria-describedby="subject-error">
                            <div id="subject-error" class="text-error text-sm mt-1 opacity-0 transition-opacity"></div>
                        </div>
                        
                        <!-- Message Field -->
                        <div>
                            <label for="message" class="block text-sm font-medium text-gray-700 mb-1">Message</label>
                            <textarea id="message" name="message" rows="5" required
                                      class="w-full px-4 py-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent transition-all"
                                      aria-required="true"
                                      aria-describedby="message-error"></textarea>
                            <div id="message-error" class="text-error text-sm mt-1 opacity-0 transition-opacity"></div>
                        </div>
                        
                        <!-- Submit Button -->
                        <button type="submit" class="btn btn-primary w-full flex items-center justify-center" aria-label="Send message">
                            <span id="submit-text">Send Message</span>
                            <span id="submit-spinner" class="ml-2 hidden">
                                <i class="fas fa-spinner fa-spin"></i>
                            </span>
                        </button>
                    </form>
                    
                    <!-- Success Message -->
                    <div id="success-message" class="mt-6 p-4 bg-success/10 text-success rounded-md opacity-0 transition-opacity">
                        <i class="fas fa-check-circle mr-2"></i>
                        <span>Your message has been sent successfully!</span>
                    </div>
                </section>
                
                <!-- Contact Info -->
                <section aria-labelledby="contact-info-heading">
                    <h2 id="contact-info-heading" class="font-montserrat text-2xl font-semibold mb-6">Contact Information</h2>
                    
                    <div class="space-y-6">
                        <div class="flex items-start">
                            <div class="bg-primary/10 p-3 rounded-full mr-4">
                                <i class="fas fa-envelope text-primary"></i>
                            </div>
                            <div>
                                <h3 class="font-medium">Email</h3>
                                <a href="mailto:john.doe@example.com" class="text-gray-600 hover:text-primary transition-colors">john.doe@example.com</a>
                            </div>
                        </div>
                        
                        <div class="flex items-start">
                            <div class="bg-primary/10 p-3 rounded-full mr-4">
                                <i class="fas fa-phone text-primary"></i>
                            </div>
                            <div>
                                <h3 class="font-medium">Phone</h3>
                                <a href="tel:+1234567890" class="text-gray-600 hover:text-primary transition-colors">+1 (234) 567-890</a>
                            </div>
                        </div>
                        
                        <div class="flex items-start">
                            <div class="bg-primary/10 p-3 rounded-full mr-4">
                                <i class="fas fa-map-marker-alt text-primary"></i>
                            </div>
                            <div>
                                <h3 class="font-medium">Location</h3>
                                <p class="text-gray-600">San Francisco, CA</p>
                            </div>
                        </div>
                        
                        <div class="pt-4">
                            <h3 class="font-medium mb-4">Connect With Me</h3>
                            <div class="flex space-x-4">
                                <a href="https://github.com" class="text-gray-600 hover:text-primary transition-colors" aria-label="GitHub">
                                    <i class="fab fa-github text-2xl"></i>
                                </a>
                                <a href="https://linkedin.com" class="text-gray-600 hover:text-primary transition-colors" aria-label="LinkedIn">
                                    <i class="fab fa-linkedin text-2xl"></i>
                                </a>
                                <a href="https://twitter.com" class="text-gray-600 hover:text-primary transition-colors" aria-label="Twitter">
                                    <i class="fab fa-twitter text-2xl"></i>
                                </a>
                            </div>
                        </div>
                    </div>
                </section>
            </div>
        </div>
    </main>

    <!-- Footer -->
    <footer class="bg-dark text-white py-8">
        <div class="container">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <div class="mb-4 md:mb-0">
                    <p>&copy; 2023 John Doe. All rights reserved.</p>
                </div>
                <div class="flex space-x-6">
                    <a href="https://github.com" aria-label="GitHub" class="hover:text-primary">
                        <i class="fab fa-github text-xl"></i>
                    </a>
                    <a href="https://linkedin.com" aria-label="LinkedIn" class="hover:text-primary">
                        <i class="fab fa-linkedin text-xl"></i>
                    </a>
                    <a href="https://twitter.com" aria-label="Twitter" class="hover:text-primary">
                        <i class="fab fa-twitter text-xl"></i>
                    </a>
                </div>
            </div>
        </div>
    </footer>

    <!-- Custom JS -->
    <script src="/js/app.js"></script>
    <script>
        // Form submission handler
        document.getElementById('contactForm').addEventListener('submit', async (e) => {
            e.preventDefault();
            
            // Show loading state
            document.getElementById('submit-text').textContent = 'Sending...';
            document.getElementById('submit-spinner').classList.remove('hidden');
            
            // Simulate form submission (replace with actual API call)
            await new Promise(resolve => setTimeout(resolve, 1500));
            
            // Hide loading state
            document.getElementById('submit-text').textContent = 'Send Message';
            document.getElementById('submit-spinner').classList.add('hidden');
            
            // Show success message
            document.getElementById('success-message').classList.remove('opacity-0');
            
            // Reset form
            e.target.reset();
            
            // Hide success message after 5 seconds
            setTimeout(() => {
                document.getElementById('success-message').classList.add('opacity-0');
            }, 5000);
        });
    </script>
</body>
</html>